package com.example.controller;

import com.example.pojo.OaPost;
import com.example.service.IOaPostService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/post")
@CrossOrigin
public class OaPostController {

    @Autowired(required = false)
    IOaPostService oaPostService;

    @RequestMapping("/search")
    public java.util.List<OaPost> oaPostList(OaPost oaPost){ return oaPostService.oaPostList(oaPost); }

    @RequestMapping("/insert")
    public int oaPostInsert(OaPost oaPost){ return oaPostService.oaPostInsert(oaPost); }

    @RequestMapping("/delete")
    public int oaPostDelete(OaPost oaPost){ return oaPostService.oaPostDelete(oaPost); }
}
